]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Make notify() details optional again
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 16 Nov 2024 18:10:03 +0000 (19:10 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 19 Nov 2024 18:13:34 +0000 (18:13 +0000)
The parameter used to be optional until commit d54219c0982, but
after GObjectifaction `undefined` is no longer interchangeable
with `null` here.

Restore the old behavior, as it's used by extensions (including
one of our own templates).

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8068
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3548>

js/ui/main.js

index 25c28b2407828b90c81a224b28c77e8bfc673cea..73980edb88ab748400f6d88d993c5c31a011f0b2 100644 (file)
@@ -610,9 +610,9 @@ export function loadTheme() {
 
 /**
  * @param {string} msg A message
- * @param {string} details Additional information
+ * @param {string=} details Additional information
  */
-export function notify(msg, details) {
+export function notify(msg, details = null) {
     const source = MessageTray.getSystemSource();
     const notification = new MessageTray.Notification({
         source,